package com.qf.spring.test;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.sql.Connection;

/**
 * @author 郑大仙丶
 * @version 1.0
 * @date 2021/3/19 10:03
 *
 * 测试FactoryBean
 */
public class Demo3 {

    @Test
    public void test(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");

        Object conn =  ac.getBean("&conn");

        System.out.println(conn);
    }

}
